import { MciTimelineItem } from '@/components/base';
import { TApprovalStartActivity } from '@/components/business/Approval/approval-helper';
// import { t } from '@/locales';
import { PropType } from 'vue';
import { approvalDateFormat } from '.';
import { renderCCInfo } from './CCInfo';
// 提交数据节点
export const StartNode = defineComponent({
  props: {
    data: {
      type: Object as PropType<TApprovalStartActivity | undefined>,
      default: () => {}
    }
  },
  setup() {},
  render() {
    return (
      <MciTimelineItem type="primary" hollow={true}>
        <div class="text-value-14 mt-4">{this.data?.activityName || ''}</div>
        <div class="text-label-12  mt-4 ">
          {'由'} <span class="text-value-12">{this.data?.stater?.userName || ''}</span> {'提交数据'}
        </div>
        <div class="text-label-12 mt-4">{approvalDateFormat(this.data?.endTime || '')}</div>
        {renderCCInfo('start', this.data)}
      </MciTimelineItem>
    );
  }
});
